<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>jQuery demo 1</title>
	<script src="jquery-1.4.2.js"></script>
	<script type="text/javascript">
   		function getValue(){
   			$(".test").each(function(index, object){
   				index = index + 1;
   				alert("第"+index+"个文本框的值是:"+object.value);	
   		   })
   		}
    </script>
</head>
<body>

<ul>
	<li><input type="text" class="test" /></li>
	<li><input type="text" class="test" /></li>	
	<li><input type="text" class="test" /></li>
	<li><input type="text" class="test" /></li>
	<li><input type="text" class="test" /></li>
</ul>

<input type="button" onclick="getValue()" value="狠狠地点击我显示输入框里的值" />

</body>
</html>
